package name.hankc.spring;

import java.util.stream.Stream;

import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

public class AnnotationComponentApplication {

  public static void main(String[] args) throws Exception {
    ApplicationContext ctx = new AnnotationConfigApplicationContext(ComponentScanConfiguration.class);
    String[] beanNames = ctx.getBeanDefinitionNames();
    Stream.of(beanNames).forEach(System.out::println);
  }
}